package com.gzy.mylog.modules.log;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.BaseDraggableModule;
import com.chad.library.adapter.base.module.DraggableModule;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gzy.mylog.R;
import com.gzy.mylog.model.Log;

import org.jetbrains.annotations.Nullable;

import java.util.List;

public class LogAdapter  extends BaseQuickAdapter<Log, BaseViewHolder> implements LoadMoreModule
//        , DraggableModule
{


    public LogAdapter( @Nullable List<Log> data) {
        super(R.layout.item_log, data);
    }

    @Override
    protected void convert(BaseViewHolder viewHolder, Log item) {
        //添加Item子控件的点击事件
//        helper.addOnClickListener(R.id.tv_name);
//        //赋值
        viewHolder.setText(R.id.tv_log,item.getContent());
        viewHolder.setText(R.id.tv_date,item.getCreateAtShow());
//        viewHolder.setText(R.id.tv_me_title_name,"Hello："+item);
//        ImageView iv_cover = viewHolder.getView(R.id.iv_cover);
//        iv_cover.setImageResource(mContext.getResources().getIdentifier("ic_palette_0" + viewHolder.getLayoutPosition() % 4, "drawable", mContext.getPackageName()));
    }
}
